function Fcon=imagecontrast(graypic)

x=double(graypic(:));
%forth moment
M4=mean((x-mean(x)).^4);
%variance
delta2=var(x,1);
%kurtosis
alfa4=M4/(delta2^2);
%standard deviation
delta=std(x,1);
%contrast
Fcon=delta/(alfa4^(1/4));